<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>测试vue生命周期函数</title>
		<script src="../js/vue.js"></script>
		<script type="text/javascript" src="../js/axios.js"></script>
	</head>
	<body>
		<div id="app">
			
		</div>
		<script type="text/javascript">
			axios.get("http://localhost:8090/findAll")
				.then(function(promise){
					console.log(promise)
					console.log(promise.data)
					console.log(promise.data[2])
					console.log(promise.data[2].name)
				})
				
			let id = 1;
			let url = "http://localhost:8090/findUserById?id=" + id
			axios.get(url)
				.then(function(promise){
					console.log(promise.data)
				})
			
			let user = {age:18,sex:'女'}
			axios.get("http://localhost:8090/findUserByAS",{params:user})
				.then(function(promise){
					console.log(promise.data)
				})
				
			let user4 = {id:1,name:'大黑',age:5200,sex:'男'}
			let url4 = `http://localhost:8090/upDateById/${user4.id}/${user4.name}/${user4.age}/${user4.sex}`
			axios.put(url4)
				.then(function(promise){
					console.log(promise.data)
				})
		</script>
	</body>
</html>
